<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::StrUtil Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_str_util.html">StrUtil</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classlibemb_1_1_str_util-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::StrUtil Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>字符串工具类  
 <a href="classlibemb_1_1_str_util.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_str_util_8h_source.html">StrUtil.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6105185aefa458cdd76df3f5f6856583"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a6105185aefa458cdd76df3f5f6856583">parseNextSection</a> (const char *source, <a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *startPos, const char *endflag, <a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *section_len)</td></tr>
<tr class="memdesc:a6105185aefa458cdd76df3f5f6856583"><td class="mdescLeft">&#160;</td><td class="mdescRight">解析下一个字段  <a href="classlibemb_1_1_str_util.html#a6105185aefa458cdd76df3f5f6856583">More...</a><br /></td></tr>
<tr class="separator:a6105185aefa458cdd76df3f5f6856583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4df621bdc89d2b5adabcc11a98c65159"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a4df621bdc89d2b5adabcc11a98c65159">parseNextString</a> (const char *source, <a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *startPos, const char *endflag, char *strbuf, <a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> buflen)</td></tr>
<tr class="memdesc:a4df621bdc89d2b5adabcc11a98c65159"><td class="mdescLeft">&#160;</td><td class="mdescRight">解析下一个字符串字段  <a href="classlibemb_1_1_str_util.html#a4df621bdc89d2b5adabcc11a98c65159">More...</a><br /></td></tr>
<tr class="separator:a4df621bdc89d2b5adabcc11a98c65159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa702ff60a731cd0d746d5b390bc8819c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#aa702ff60a731cd0d746d5b390bc8819c">parseNextInt</a> (const char *source, <a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *startPos, const char *endflag, <a class="el" href="_base_type_8h.html#acb7826b9adaa8e650e7f090ec418cade">sint32</a> *result)</td></tr>
<tr class="memdesc:aa702ff60a731cd0d746d5b390bc8819c"><td class="mdescLeft">&#160;</td><td class="mdescRight">解析下一个整数字段  <a href="classlibemb_1_1_str_util.html#aa702ff60a731cd0d746d5b390bc8819c">More...</a><br /></td></tr>
<tr class="separator:aa702ff60a731cd0d746d5b390bc8819c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a735399743d6f1db8fd70d69b6286b532"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a735399743d6f1db8fd70d69b6286b532">toLower</a> (const std::string &amp;str)</td></tr>
<tr class="memdesc:a735399743d6f1db8fd70d69b6286b532"><td class="mdescLeft">&#160;</td><td class="mdescRight">将字符串转换为小写  <a href="classlibemb_1_1_str_util.html#a735399743d6f1db8fd70d69b6286b532">More...</a><br /></td></tr>
<tr class="separator:a735399743d6f1db8fd70d69b6286b532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8ef60303684f85842df4d619c13ac18"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ad8ef60303684f85842df4d619c13ac18">toUpper</a> (const std::string &amp;str)</td></tr>
<tr class="memdesc:ad8ef60303684f85842df4d619c13ac18"><td class="mdescLeft">&#160;</td><td class="mdescRight">将字符串转换为大写  <a href="classlibemb_1_1_str_util.html#ad8ef60303684f85842df4d619c13ac18">More...</a><br /></td></tr>
<tr class="separator:ad8ef60303684f85842df4d619c13ac18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a805f801809e6db64bacfe63b95fd711f"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a805f801809e6db64bacfe63b95fd711f">stringFormat</a> (const char *fmt,...)</td></tr>
<tr class="memdesc:a805f801809e6db64bacfe63b95fd711f"><td class="mdescLeft">&#160;</td><td class="mdescRight">字符串格式化  <a href="classlibemb_1_1_str_util.html#a805f801809e6db64bacfe63b95fd711f">More...</a><br /></td></tr>
<tr class="separator:a805f801809e6db64bacfe63b95fd711f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d3881f0eb6b8dd7580b893dd08fe762"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a3d3881f0eb6b8dd7580b893dd08fe762">replaceString</a> (const string &amp;source, const string &amp;str, const string &amp;rep)</td></tr>
<tr class="memdesc:a3d3881f0eb6b8dd7580b893dd08fe762"><td class="mdescLeft">&#160;</td><td class="mdescRight">用rep替换source中的str  <a href="classlibemb_1_1_str_util.html#a3d3881f0eb6b8dd7580b893dd08fe762">More...</a><br /></td></tr>
<tr class="separator:a3d3881f0eb6b8dd7580b893dd08fe762"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c3d6844e752fe57422143023b2eb528"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a6c3d6844e752fe57422143023b2eb528">suffix</a> (const string &amp;source, const string &amp;suffixFlag)</td></tr>
<tr class="memdesc:a6c3d6844e752fe57422143023b2eb528"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取后缀  <a href="classlibemb_1_1_str_util.html#a6c3d6844e752fe57422143023b2eb528">More...</a><br /></td></tr>
<tr class="separator:a6c3d6844e752fe57422143023b2eb528"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34ca966c9d551f448362b93fcb87f82e"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a34ca966c9d551f448362b93fcb87f82e">findString</a> (const string &amp;source, const string &amp;start, const string &amp;end)</td></tr>
<tr class="memdesc:a34ca966c9d551f448362b93fcb87f82e"><td class="mdescLeft">&#160;</td><td class="mdescRight">查找start开始与end结束的字符串  <a href="classlibemb_1_1_str_util.html#a34ca966c9d551f448362b93fcb87f82e">More...</a><br /></td></tr>
<tr class="separator:a34ca966c9d551f448362b93fcb87f82e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0c8903b8b4d47be4188ec4953d4cf4d"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#aa0c8903b8b4d47be4188ec4953d4cf4d">findString</a> (const string &amp;source, const string &amp;pattern, const string &amp;before, const string &amp;after)</td></tr>
<tr class="memdesc:aa0c8903b8b4d47be4188ec4953d4cf4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">查找匹配字段  <a href="classlibemb_1_1_str_util.html#aa0c8903b8b4d47be4188ec4953d4cf4d">More...</a><br /></td></tr>
<tr class="separator:aa0c8903b8b4d47be4188ec4953d4cf4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fc461ee92c019d9136e505a46428bb4"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a2fc461ee92c019d9136e505a46428bb4">trimHeadWith</a> (const string &amp;source, const string &amp;trimch)</td></tr>
<tr class="memdesc:a2fc461ee92c019d9136e505a46428bb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">从字符串头部去除trimch包含的字符,直至遇到非trimch字符为止  <a href="classlibemb_1_1_str_util.html#a2fc461ee92c019d9136e505a46428bb4">More...</a><br /></td></tr>
<tr class="separator:a2fc461ee92c019d9136e505a46428bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad30272784ad1d818d55f9cad3f26dd6f"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ad30272784ad1d818d55f9cad3f26dd6f">trimTailBlank</a> (const string &amp;source, bool trimHead=true, bool trimTail=true)</td></tr>
<tr class="memdesc:ad30272784ad1d818d55f9cad3f26dd6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">去除字符串首尾两端的不可见字符  <a href="classlibemb_1_1_str_util.html#ad30272784ad1d818d55f9cad3f26dd6f">More...</a><br /></td></tr>
<tr class="separator:ad30272784ad1d818d55f9cad3f26dd6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a68a0832f5b4ddfa7e8986c896bd4eb"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a4a68a0832f5b4ddfa7e8986c896bd4eb">trimAllBlank</a> (const string &amp;source)</td></tr>
<tr class="memdesc:a4a68a0832f5b4ddfa7e8986c896bd4eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">去除字符串中所有不可见字符  <a href="classlibemb_1_1_str_util.html#a4a68a0832f5b4ddfa7e8986c896bd4eb">More...</a><br /></td></tr>
<tr class="separator:a4a68a0832f5b4ddfa7e8986c896bd4eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32e3489824dc99e0d2c7961e9fa2977e"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a32e3489824dc99e0d2c7961e9fa2977e">trimHeadUnvisible</a> (const string &amp;source)</td></tr>
<tr class="memdesc:a32e3489824dc99e0d2c7961e9fa2977e"><td class="mdescLeft">&#160;</td><td class="mdescRight">从头开始获取可见字符，到第一个不可见字符结束；  <a href="classlibemb_1_1_str_util.html#a32e3489824dc99e0d2c7961e9fa2977e">More...</a><br /></td></tr>
<tr class="separator:a32e3489824dc99e0d2c7961e9fa2977e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab861c81a8aaa8aa83e01397d37ce703a"><td class="memItemLeft" align="right" valign="top">static vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ab861c81a8aaa8aa83e01397d37ce703a">splitString</a> (const string &amp;source, const string &amp;splitFlag, bool withFlag=false)</td></tr>
<tr class="memdesc:ab861c81a8aaa8aa83e01397d37ce703a"><td class="mdescLeft">&#160;</td><td class="mdescRight">拆分字符串  <a href="classlibemb_1_1_str_util.html#ab861c81a8aaa8aa83e01397d37ce703a">More...</a><br /></td></tr>
<tr class="separator:ab861c81a8aaa8aa83e01397d37ce703a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5758c6697854224ac325884403d58d"><td class="memItemLeft" align="right" valign="top">static vector&lt; string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#afb5758c6697854224ac325884403d58d">cutString</a> (const string &amp;source, const string &amp;startFlag, const string &amp;stopFlag, const string &amp;cutFlag)</td></tr>
<tr class="memdesc:afb5758c6697854224ac325884403d58d"><td class="mdescLeft">&#160;</td><td class="mdescRight">分割字符串  <a href="classlibemb_1_1_str_util.html#afb5758c6697854224ac325884403d58d">More...</a><br /></td></tr>
<tr class="separator:afb5758c6697854224ac325884403d58d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b447bb599f1333de2bd83a7040a453a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a2b447bb599f1333de2bd83a7040a453a">patternCount</a> (const string &amp;source, const string &amp;pattern)</td></tr>
<tr class="memdesc:a2b447bb599f1333de2bd83a7040a453a"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取匹配次数  <a href="classlibemb_1_1_str_util.html#a2b447bb599f1333de2bd83a7040a453a">More...</a><br /></td></tr>
<tr class="separator:a2b447bb599f1333de2bd83a7040a453a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8901d8c44e38bcb6ee275c8c04e758ac"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a8901d8c44e38bcb6ee275c8c04e758ac">charToInt</a> (char ch)</td></tr>
<tr class="memdesc:a8901d8c44e38bcb6ee275c8c04e758ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">ASCII码转换为数字  <a href="classlibemb_1_1_str_util.html#a8901d8c44e38bcb6ee275c8c04e758ac">More...</a><br /></td></tr>
<tr class="separator:a8901d8c44e38bcb6ee275c8c04e758ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c1d36e7cc768344faae951a7c82b300"><td class="memItemLeft" align="right" valign="top">static char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a5c1d36e7cc768344faae951a7c82b300">intToChar</a> (int val)</td></tr>
<tr class="memdesc:a5c1d36e7cc768344faae951a7c82b300"><td class="mdescLeft">&#160;</td><td class="mdescRight">数字转换为ASCII码  <a href="classlibemb_1_1_str_util.html#a5c1d36e7cc768344faae951a7c82b300">More...</a><br /></td></tr>
<tr class="separator:a5c1d36e7cc768344faae951a7c82b300"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0eedf051d02cef6fe6c5bbfe4558f19a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a0eedf051d02cef6fe6c5bbfe4558f19a">hexBinarize</a> (const string hexStr, char *bytesBuf, int len)</td></tr>
<tr class="memdesc:a0eedf051d02cef6fe6c5bbfe4558f19a"><td class="mdescLeft">&#160;</td><td class="mdescRight">16进制字符串转为二进制字节  <a href="classlibemb_1_1_str_util.html#a0eedf051d02cef6fe6c5bbfe4558f19a">More...</a><br /></td></tr>
<tr class="separator:a0eedf051d02cef6fe6c5bbfe4558f19a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62c7c633b5391650828738d63bc174a5"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a62c7c633b5391650828738d63bc174a5">hexVisualize</a> (const char *codebuf, int len)</td></tr>
<tr class="memdesc:a62c7c633b5391650828738d63bc174a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">编码转为可视字符串  <a href="classlibemb_1_1_str_util.html#a62c7c633b5391650828738d63bc174a5">More...</a><br /></td></tr>
<tr class="separator:a62c7c633b5391650828738d63bc174a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae101a0b7abec5cc9a1680e31a7f52d51"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ae101a0b7abec5cc9a1680e31a7f52d51">hexStrToInt</a> (const std::string &amp;hexStr)</td></tr>
<tr class="memdesc:ae101a0b7abec5cc9a1680e31a7f52d51"><td class="mdescLeft">&#160;</td><td class="mdescRight">16进制字符串转换为数字  <a href="classlibemb_1_1_str_util.html#ae101a0b7abec5cc9a1680e31a7f52d51">More...</a><br /></td></tr>
<tr class="separator:ae101a0b7abec5cc9a1680e31a7f52d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82d2ee37b47dda91f207709c43fe8897"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a82d2ee37b47dda91f207709c43fe8897">stringToInt</a> (std::string intStr)</td></tr>
<tr class="memdesc:a82d2ee37b47dda91f207709c43fe8897"><td class="mdescLeft">&#160;</td><td class="mdescRight">字符串转换为正数  <a href="classlibemb_1_1_str_util.html#a82d2ee37b47dda91f207709c43fe8897">More...</a><br /></td></tr>
<tr class="separator:a82d2ee37b47dda91f207709c43fe8897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5c43a7dafcf8bf5ae4a99f327ab5a66"><td class="memItemLeft" align="right" valign="top">static string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ac5c43a7dafcf8bf5ae4a99f327ab5a66">intToString</a> (int num)</td></tr>
<tr class="memdesc:ac5c43a7dafcf8bf5ae4a99f327ab5a66"><td class="mdescLeft">&#160;</td><td class="mdescRight">帧数转换为字符串  <a href="classlibemb_1_1_str_util.html#ac5c43a7dafcf8bf5ae4a99f327ab5a66">More...</a><br /></td></tr>
<tr class="separator:ac5c43a7dafcf8bf5ae4a99f327ab5a66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a461809230c90d7c718fc2d4df9328d8c"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a461809230c90d7c718fc2d4df9328d8c">isHexString</a> (const std::string &amp;hexString)</td></tr>
<tr class="memdesc:a461809230c90d7c718fc2d4df9328d8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断是否是16进制字符串  <a href="classlibemb_1_1_str_util.html#a461809230c90d7c718fc2d4df9328d8c">More...</a><br /></td></tr>
<tr class="separator:a461809230c90d7c718fc2d4df9328d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41caa31b2c8ed8685f6d990b885841d9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#a41caa31b2c8ed8685f6d990b885841d9">isIntString</a> (const std::string &amp;intString)</td></tr>
<tr class="memdesc:a41caa31b2c8ed8685f6d990b885841d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断是否是10进制整数字符串  <a href="classlibemb_1_1_str_util.html#a41caa31b2c8ed8685f6d990b885841d9">More...</a><br /></td></tr>
<tr class="separator:a41caa31b2c8ed8685f6d990b885841d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac83e4102a1746297ec65e96dd8967f7e"><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_str_util.html#ac83e4102a1746297ec65e96dd8967f7e">memString</a> (char *mem, int n, char *str, int size)</td></tr>
<tr class="memdesc:ac83e4102a1746297ec65e96dd8967f7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">搜索内存字符  <a href="classlibemb_1_1_str_util.html#ac83e4102a1746297ec65e96dd8967f7e">More...</a><br /></td></tr>
<tr class="separator:ac83e4102a1746297ec65e96dd8967f7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>字符串工具类 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8901d8c44e38bcb6ee275c8c04e758ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8901d8c44e38bcb6ee275c8c04e758ac">&#9670;&nbsp;</a></span>charToInt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::StrUtil::charToInt </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>ASCII码转换为数字 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ch</td><td>ASCII码字符 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ch对应的数字 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>字符'0'~'9'转换后为数字0~9,'a'~'f'或'A'~'F'转换后为10~16,其余返回值为-1 </dd></dl>

</div>
</div>
<a id="afb5758c6697854224ac325884403d58d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb5758c6697854224ac325884403d58d">&#9670;&nbsp;</a></span>cutString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; string &gt; libemb::StrUtil::cutString </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>startFlag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>stopFlag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>cutFlag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>分割字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回分割后的字串数组(不包括分割符) </dd></dl>
<dl class="section note"><dt>Note</dt><dd>分割从startFlag后到endFlag之前的字串,分割符为cutFlag,例： s="+ABC:1,2,3,,,6,7\r" ==&gt; cutString(s,"+ABC:","\r",",") 返回结果:["1","2","3","","","6","7"] </dd></dl>

</div>
</div>
<a id="aa0c8903b8b4d47be4188ec4953d4cf4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0c8903b8b4d47be4188ec4953d4cf4d">&#9670;&nbsp;</a></span>findString() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string libemb::StrUtil::findString </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>before</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>after</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>查找匹配字段 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">pattern</td><td>匹配字串 </td></tr>
    <tr><td class="paramname">before</td><td>匹配字串之前的字串 </td></tr>
    <tr><td class="paramname">after</td><td>匹配字串之后的字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回找到的字符串 </dd></dl>

</div>
</div>
<a id="a34ca966c9d551f448362b93fcb87f82e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34ca966c9d551f448362b93fcb87f82e">&#9670;&nbsp;</a></span>findString() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::findString </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>查找start开始与end结束的字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">start</td><td>开始字串 </td></tr>
    <tr><td class="paramname">end</td><td>结束字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回找到的字符串 </dd></dl>

</div>
</div>
<a id="a0eedf051d02cef6fe6c5bbfe4558f19a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0eedf051d02cef6fe6c5bbfe4558f19a">&#9670;&nbsp;</a></span>hexBinarize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::StrUtil::hexBinarize </td>
          <td>(</td>
          <td class="paramtype">const string&#160;</td>
          <td class="paramname"><em>hexStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>bytesBuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>16进制字符串转为二进制字节 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hexStr</td><td>待转换16进制字符串 </td></tr>
    <tr><td class="paramname">bytesBuf</td><td>转换好的编码缓存 </td></tr>
    <tr><td class="paramname">len</td><td>缓存大小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>成功返回转换结果的长度,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>Note</dt><dd>"0041001F" ==&gt;[0x00][0x41][0x00][0x1F] </dd></dl>

</div>
</div>
<a id="ae101a0b7abec5cc9a1680e31a7f52d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae101a0b7abec5cc9a1680e31a7f52d51">&#9670;&nbsp;</a></span>hexStrToInt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::StrUtil::hexStrToInt </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hexStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>16进制字符串转换为数字 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hexStr</td><td>16进制字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回计算结果 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>"80FF" -&gt; 33023 </dd></dl>

</div>
</div>
<a id="a62c7c633b5391650828738d63bc174a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62c7c633b5391650828738d63bc174a5">&#9670;&nbsp;</a></span>hexVisualize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::hexVisualize </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>codebuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>编码转为可视字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">codebuf</td><td>待转换的编码缓存 </td></tr>
    <tr><td class="paramname">len</td><td>缓存大小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>成功返回转换后的字符串,失败返回空字符串 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>[0x00][0x41][0x00][0x1F]==&gt;"0041001F" </dd></dl>

</div>
</div>
<a id="a5c1d36e7cc768344faae951a7c82b300"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c1d36e7cc768344faae951a7c82b300">&#9670;&nbsp;</a></span>intToChar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char libemb::StrUtil::intToChar </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>数字转换为ASCII码 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">val</td><td>数字 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>数字对应的ASCII码字符 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>数字0~9转成字符'0'~'9',数字10~16转成'A'~'F',其余返回值为0,为字符串结束符 </dd></dl>

</div>
</div>
<a id="ac5c43a7dafcf8bf5ae4a99f327ab5a66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5c43a7dafcf8bf5ae4a99f327ab5a66">&#9670;&nbsp;</a></span>intToString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string libemb::StrUtil::intToString </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>帧数转换为字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

</div>
</div>
<a id="a461809230c90d7c718fc2d4df9328d8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a461809230c90d7c718fc2d4df9328d8c">&#9670;&nbsp;</a></span>isHexString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::StrUtil::isHexString </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hexString</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断是否是16进制字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hexString</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="a41caa31b2c8ed8685f6d990b885841d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41caa31b2c8ed8685f6d990b885841d9">&#9670;&nbsp;</a></span>isIntString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::StrUtil::isIntString </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>intString</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断是否是10进制整数字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">intString</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>

</div>
</div>
<a id="ac83e4102a1746297ec65e96dd8967f7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac83e4102a1746297ec65e96dd8967f7e">&#9670;&nbsp;</a></span>memString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char * libemb::StrUtil::memString </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>mem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>搜索内存字符 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mem</td><td></td></tr>
    <tr><td class="paramname">n</td><td></td></tr>
    <tr><td class="paramname">str</td><td></td></tr>
    <tr><td class="paramname">size</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>char* </dd></dl>
<dl class="section note"><dt>Note</dt><dd>在[mem,mem+n)区间搜索字符串str,返回地址,未找到返回NULL </dd></dl>

</div>
</div>
<a id="aa702ff60a731cd0d746d5b390bc8819c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa702ff60a731cd0d746d5b390bc8819c">&#9670;&nbsp;</a></span>parseNextInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::StrUtil::parseNextInt </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *&#160;</td>
          <td class="paramname"><em>startPos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>endflag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#acb7826b9adaa8e650e7f090ec418cade">sint32</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>解析下一个整数字段 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramname">startPos</td><td></td></tr>
    <tr><td class="paramname">endflag</td><td></td></tr>
    <tr><td class="paramname">result</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
<dl class="section note"><dt>Note</dt><dd>C风格的解析函数(一般用来解析固定分隔符的字符串,如AT指令) </dd></dl>

</div>
</div>
<a id="a6105185aefa458cdd76df3f5f6856583"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6105185aefa458cdd76df3f5f6856583">&#9670;&nbsp;</a></span>parseNextSection()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * libemb::StrUtil::parseNextSection </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *&#160;</td>
          <td class="paramname"><em>startPos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>endflag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *&#160;</td>
          <td class="paramname"><em>section_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>解析下一个字段 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramname">startPos</td><td></td></tr>
    <tr><td class="paramname">endflag</td><td></td></tr>
    <tr><td class="paramname">section_len</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>char* </dd></dl>
<dl class="section note"><dt>Note</dt><dd>C风格的解析函数(一般用来解析固定分隔符的字符串,如AT指令) </dd></dl>

</div>
</div>
<a id="a4df621bdc89d2b5adabcc11a98c65159"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4df621bdc89d2b5adabcc11a98c65159">&#9670;&nbsp;</a></span>parseNextString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool libemb::StrUtil::parseNextString </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a> *&#160;</td>
          <td class="paramname"><em>startPos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>endflag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>strbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_base_type_8h.html#a01991db9cc388cf9815386e13465f332">uint32</a>&#160;</td>
          <td class="paramname"><em>buflen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>解析下一个字符串字段 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramname">startPos</td><td></td></tr>
    <tr><td class="paramname">endflag</td><td></td></tr>
    <tr><td class="paramname">strbuf</td><td></td></tr>
    <tr><td class="paramname">buflen</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
<dl class="section note"><dt>Note</dt><dd>C风格的解析函数(一般用来解析固定分隔符的字符串,如AT指令) </dd></dl>

</div>
</div>
<a id="a2b447bb599f1333de2bd83a7040a453a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b447bb599f1333de2bd83a7040a453a">&#9670;&nbsp;</a></span>patternCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::StrUtil::patternCount </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>pattern</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取匹配次数 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">pattern</td><td>匹配字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回匹配次数 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

</div>
</div>
<a id="a3d3881f0eb6b8dd7580b893dd08fe762"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d3881f0eb6b8dd7580b893dd08fe762">&#9670;&nbsp;</a></span>replaceString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::replaceString </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>rep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>用rep替换source中的str </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">str</td><td>被替换字符串 </td></tr>
    <tr><td class="paramname">rep</td><td>替换字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回新字符串 </dd></dl>

</div>
</div>
<a id="ab861c81a8aaa8aa83e01397d37ce703a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab861c81a8aaa8aa83e01397d37ce703a">&#9670;&nbsp;</a></span>splitString()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; string &gt; libemb::StrUtil::splitString </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>splitFlag</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>withFlag</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>拆分字符串 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">splitFlag</td><td>拆分符 </td></tr>
    <tr><td class="paramname">withFlag</td><td>是否包含拆分符 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回拆分后的字串数组 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>以splitFlag为标识拆分整个字串 </dd></dl>

</div>
</div>
<a id="a805f801809e6db64bacfe63b95fd711f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a805f801809e6db64bacfe63b95fd711f">&#9670;&nbsp;</a></span>stringFormat()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string libemb::StrUtil::stringFormat </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>字符串格式化 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fmt</td><td>格式化字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回转换好的字符串 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>将C风格字符串格式化为string,最长1024字节 </dd></dl>

</div>
</div>
<a id="a82d2ee37b47dda91f207709c43fe8897"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82d2ee37b47dda91f207709c43fe8897">&#9670;&nbsp;</a></span>stringToInt()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::StrUtil::stringToInt </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>intStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>字符串转换为正数 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">intStr</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>
<dl class="section note"><dt>Note</dt><dd>"1234" -&gt; 1234 </dd></dl>

</div>
</div>
<a id="a6c3d6844e752fe57422143023b2eb528"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c3d6844e752fe57422143023b2eb528">&#9670;&nbsp;</a></span>suffix()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::suffix </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>suffixFlag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取后缀 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramname">suffixFlag</td><td>后缀标识 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string 返回后缀名称(包含后缀标识) </dd></dl>
<dl class="section note"><dt>Note</dt><dd>如suffix("/home/user/log.txt","."),将返回".txt" </dd></dl>

</div>
</div>
<a id="a735399743d6f1db8fd70d69b6286b532"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a735399743d6f1db8fd70d69b6286b532">&#9670;&nbsp;</a></span>toLower()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::toLower </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>将字符串转换为小写 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>源字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回转换好的字符串 </dd></dl>

</div>
</div>
<a id="ad8ef60303684f85842df4d619c13ac18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8ef60303684f85842df4d619c13ac18">&#9670;&nbsp;</a></span>toUpper()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::toUpper </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>将字符串转换为大写 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>源字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回转换好的字符串 </dd></dl>

</div>
</div>
<a id="a4a68a0832f5b4ddfa7e8986c896bd4eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a68a0832f5b4ddfa7e8986c896bd4eb">&#9670;&nbsp;</a></span>trimAllBlank()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::trimAllBlank </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>去除字符串中所有不可见字符 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回trim后得到的字符串 </dd></dl>

</div>
</div>
<a id="a32e3489824dc99e0d2c7961e9fa2977e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32e3489824dc99e0d2c7961e9fa2977e">&#9670;&nbsp;</a></span>trimHeadUnvisible()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string libemb::StrUtil::trimHeadUnvisible </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>从头开始获取可见字符，到第一个不可见字符结束； </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回截取的字符串 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>例:result = trimHeadUnvisible("000123 4");//result="000123" </dd></dl>

</div>
</div>
<a id="a2fc461ee92c019d9136e505a46428bb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fc461ee92c019d9136e505a46428bb4">&#9670;&nbsp;</a></span>trimHeadWith()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string libemb::StrUtil::trimHeadWith </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>trimch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>从字符串头部去除trimch包含的字符,直至遇到非trimch字符为止 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回trim后得到的字符串 </dd></dl>
<dl class="section note"><dt>Note</dt><dd>例:result = trimHeadWith(" 0001234","0 ");//result="1234" </dd></dl>

</div>
</div>
<a id="ad30272784ad1d818d55f9cad3f26dd6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad30272784ad1d818d55f9cad3f26dd6f">&#9670;&nbsp;</a></span>trimTailBlank()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::StrUtil::trimTailBlank </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>trimHead</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>trimTail</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>去除字符串首尾两端的不可见字符 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>源字串 </td></tr>
    <tr><td class="paramname">trimHead</td><td>是否去除头部,默认为true </td></tr>
    <tr><td class="paramname">trimTail</td><td>是否去除尾部,默认为true </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>返回trim后得到的字符串 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_str_util_8h_source.html">StrUtil.h</a></li>
<li>src/StrUtil.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
